module PhlatScript
# Class contains methods for dealing with sketchup directories.
# Class implements platform specific methods for accessing directories
# $Id: SketchupDirectoryUtils.rb 39 2014-04-16 09:26:56Z swarfer@gmail.com $

#   class SketchupDirectoryUtils
# not a class, just a tool method as part of PhlatScript. module

     def PhlatScript.toolsProfilesPath
       # this method returns a path for storing profiles.
       # path depends on the system, macosx is recognized by RUBY_PLATFORM.
       if RUBY_PLATFORM =~ /(darwin)/
         # Sketchup.find_support_file returns directory in:
         # ~/Library/Application Support/Sketchup X/SketchUp/
         # we will store profiles in Profiles subdirectory
         path = File.join(Sketchup.find_support_file("Plugins"),"Phlatboyz", "Profiles")
       else # Windows
         path = ENV['APPDATA'] + "\\Sketchup"
       end
       return path
     end
#   end

end